#include <stdio.h>
#include<unistd.h>
#include<stdlib.h>

#define N 5

void runChild()
{
    int cnt = 10;
    while(cnt)
    {
        printf("I'm child, my pid : %d; ppid : %d\n", getpid(), getppid());
        sleep(1);
        cnt--;
    }
}

int main()
{
    int t = N;
    while(t--)
    {
         pid_t pid = fork();
        if(pid == 0)
        {
            runChild();
            exit(0);
        }
    }
    
    sleep(1000);

    return 0;
}

